﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoundationLib.Ifc.Authorisation.Configuration;

namespace FoundationLib.Ifc.Authorisation
{
	/// <summary>
	/// This interface provides methods for accessing authorisation service functionality.
	/// </summary>
	public interface IAuthorisationService
	{
		/// <summary>
		/// Gets or sets the authorisation service configuration.
		/// </summary>
		AuthorisationConfigElement Configuration
		{
			get;
			set;
		}

		/// <summary>
		/// Authorises the user with the given credentials against the directory service.
		/// </summary>
		/// <param name="username">The username</param>
		/// <param name="password">The password</param>
		/// <returns>True if the user has been authorised successfully, false otherwise</returns>
		bool Authorise(string username, string password);
	}
}
